<template>
	<view class="content">
		<navbar backIconName="arrow-left" :title="titleContent" :titleStyle="titleStyle"></navbar>
		<scroll-view class="scroll-view_H" scroll-y="true">
			<view :style="{height:statusHeight+'px'}"></view>
			<image style="width: 100%;height: auto;" mode="widthFix" :src="imageUrl" @load="imageSuccess"
				@error="imageError"></image>
		</scroll-view>

		<!-- loading -->
		<u-overlay :show="showLoading" :opacity="0.8">
			<view class="warp">
				<text style="font-size: 28rpx;color: #fff;">加载中...</text>
			</view>
		</u-overlay>
	</view>
</template>

<script>
	let App = getApp();
	import store from '@/store'
	export default {
		components: {},
		data() {
			return {
				showLoading: true,
				titleContent: "操作指引",
				statusHeight: 44 + App.globalData.statusBarHeight,
				titleStyle: {
					color: "#ffffff",
					fontWeight: "bold",
					fontSize: "18px"
				},
				imageUrl: ''

			};
		},
		onLoad(options) {
			this.imageUrl = options.imageUrl
			this.showLoading = true
		},
		methods: {
			/* 图片加载完成 */
			imageSuccess(e) {
				console.log('image' + e.detail)
				this.showLoading = false
			},
			/* 图片加载失败 */
			imageError(e) {
				this.showLoading = false
				uni.$u.toast('加载失败')
			}
		}
	};
</script>

<style lang="scss" scoped>
	.warp {
		display: flex;
		align-items: center;
		justify-content: center;
		height: 100%;
	}
</style>